package com.ysd.lis.controller.sta;


import com.ysd.common.Result;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.entity.sta.StaGermDict;
import com.ysd.lis.request.AntibioticsDictParam;
import com.ysd.lis.request.StaGremDictDto;
import com.ysd.lis.request.Params;
import com.ysd.lis.service.sta.StaGermDictService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


/**
 * <p>
 * 微生物基础字典 前端控制器
 * </p>
 *
 * @author HuaiXing
 * @since 2025-01-15
 */
@RestController
@RequestMapping("/sta/germ/dict")
public class StaGermDictController extends BaseController {

    @Autowired
    StaGermDictService bacGermDictService;

    @ApiOperation("获取微生物字典")
    @GetMapping("/findGermList")
    public Result findGermList(Params params) {
        return bacGermDictService.findGermList(params);
    }

    @ApiOperation("获取微生物字典列表")
    @GetMapping("/getGermsByParams")
    public Result getGermsByParams(Params params) {
        return bacGermDictService.getGermsByParams(params);
    }

    @ApiOperation("添加微生物字典")
    @PostMapping("/addGermDict")
    public Result addGermDict(@RequestBody StaGermDict bacGermDict) {
        return bacGermDictService.addGermDict(bacGermDict);
    }

    @ApiOperation("修改微生物字典")
    @PostMapping("/updateGermDict")
    public Result updateGermDict(@RequestBody StaGermDict bacGermDict) {
        return bacGermDictService.updateGermDict(bacGermDict);
    }



    @ApiOperation("批量")
    @PostMapping("/batchDeleteGermDict")
    public Result batchDeleteGermDict(@RequestBody StaGremDictDto vo) {
        return bacGermDictService.batchDeleteGermDict(vo);
    }


    @ApiOperation("通过仪器id获取所有微生物信息")
    @GetMapping("/findGermDictByInstrId")
    public Result findGermDictByInstrId(AntibioticsDictParam dictParam) {
        return bacGermDictService.findGermDictByInstrId(dictParam);
    }

    @ApiOperation("通过仪器id获取绑定微生物信息")
    @GetMapping("/findInstrGermDictsByInstrId")
    public Result findInstrGermDictsByInstrId(AntibioticsDictParam dictParam) {
        return bacGermDictService.findInstrGermDictsByInstrId(dictParam);
    }

}
